import {createI18n} from 'vue-i18n'
import en from './en'
import zhCn from './zhCn'

const defaultLocale = localStorage.getItem('locale') || 'zhCn'

const i18n = createI18n({
    locale:defaultLocale,
    fallbackLocale:'en',
    allowComposition:true,
    legacy:false,
    messages:{
        'zhCn':zhCn,
        'en':en
    }
})

export default i18n